import * as service from "@/service";
import { IPick } from "./interface";
const pick: IPick = {
  state: {
    pickList: [],
  },
  actions: {
    async getPickList({ commit }, { val }) {
      const res = await service.fetchPickList(val);
      commit({
        type: "GET_PICK_LIST",
        payload: res?.data,
      });
    },
  },
  mutations: {
    GET_PICK_LIST(state, { payload }) {
      state.pickList = payload;
    },
  },
  namespaced: true,
};
export default pick;
